package benchmarks.tpch.mongo.domain;

import java.util.Date;

public class Customer extends TPCHDomain<Integer>{
//    TPCHLoaderMySQL.CastTypes.LONG,   // c_custkey
//    TPCHLoaderMySQL.CastTypes.STRING, // c_name
//    TPCHLoaderMySQL.CastTypes.STRING, // c_address
//    TPCHLoaderMySQL.CastTypes.LONG,   // c_nationkey
//    TPCHLoaderMySQL.CastTypes.STRING, // c_phone
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // c_acctbal
//    TPCHLoaderMySQL.CastTypes.STRING, // c_mktsegment
//    TPCHLoaderMySQL.CastTypes.STRING  // c_comment
    private int c_custkey; //primary //1
    private String c_name; //2
    private String c_address; //3
    private int c_nationkey; //4
    private String c_phone; //5
    private double c_acctbal; //6
    private String c_mktsegment; //7
    private String c_comment; //8

    @Override
    public void setInt(int pos, int value) {
        if (pos == 1) {
            c_custkey = value;
        }
        else if (pos == 4) {
            c_nationkey = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDouble(int pos, double value) {
        if (pos == 6) {
            c_acctbal = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setString(int pos, String value) {
        if (pos == 2) {
            c_name = value;
        }
        else if (pos == 3) {
            c_address = value;
        }
        else if (pos == 5) {
            c_phone = value;
        }
        else if (pos == 7) {
            c_mktsegment = value;
        }
        else if (pos == 8) {
            c_comment = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDate(int pos, Date value) {
        System.out.println("Wrong pos");
    }

    @Override
    public Integer getPrimaryKey() {
        return c_custkey;
    }

    public int getC_custkey() {
        return c_custkey;
    }

    public void setC_custkey(int c_custkey) {
        this.c_custkey = c_custkey;
    }

    public String getC_name() {
        return c_name;
    }

    public void setC_name(String c_name) {
        this.c_name = c_name;
    }

    public String getC_address() {
        return c_address;
    }

    public void setC_address(String c_address) {
        this.c_address = c_address;
    }

    public int getC_nationkey() {
        return c_nationkey;
    }

    public void setC_nationkey(int c_nationkey) {
        this.c_nationkey = c_nationkey;
    }

    public String getC_phone() {
        return c_phone;
    }

    public void setC_phone(String c_phone) {
        this.c_phone = c_phone;
    }

    public double getC_acctbal() {
        return c_acctbal;
    }

    public void setC_acctbal(double c_acctbal) {
        this.c_acctbal = c_acctbal;
    }

    public String getC_mktsegment() {
        return c_mktsegment;
    }

    public void setC_mktsegment(String c_mktsegment) {
        this.c_mktsegment = c_mktsegment;
    }

    public String getC_comment() {
        return c_comment;
    }

    public void setC_comment(String c_comment) {
        this.c_comment = c_comment;
    }
}
